package com.wicket.okrcomponent.web.contorller;

import cn.hutool.core.bean.BeanUtil;
import com.github.pagehelper.Page;
import com.github.pagehelper.page.PageMethod;
import com.wicket.okrcomponent.biz.service.FinanceService;
import com.wicket.okrcomponent.biz.service.dto.req.*;
import com.wicket.okrcomponent.biz.service.dto.res.*;
import com.wicket.okrcomponent.common.ro.OkrResult;
import com.wicket.okrcomponent.common.util.CommonFunctionHelper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author ：
 * @date ：
 *
 *
 * @version 1.0
 */
@RestController
@RequestMapping("/comp/finance/")
public class FinanceController {

  @Autowired
  FinanceService financeService;
/**
   * D2-查询目标预算设置个性准备列表(redis)
   */
    @PostMapping("queryTargetBudgetSetPersonalPreListCom")
    public OkrResult<QueryTargetBudgetSetPersonalPreListComRespDto> queryTargetBudgetSetPersonalPreListCom(@RequestBody @Validated QueryTargetBudgetSetPersonalPreListComReqDto reqDTO){
    return OkrResult.success(financeService.queryTargetBudgetSetPersonalPreListCom(reqDTO));
    }
/**
   * D2-新增账户个性准备(redis)
   */
    @PostMapping("addAccountPersonalPreCom")
    public OkrResult<AddAccountPersonalPreComRespDto> addAccountPersonalPreCom(@RequestBody @Validated AddAccountPersonalPreComReqDto reqDTO){
    return OkrResult.success(financeService.addAccountPersonalPreCom(reqDTO));
    }
/**
   * D2-查询账户个性准备列表(redis)
   */
    @PostMapping("queryAccountPersonalPreListCom")
    public OkrResult<QueryAccountPersonalPreListComRespDto> queryAccountPersonalPreListCom(@RequestBody @Validated QueryAccountPersonalPreListComReqDto reqDTO){
    return OkrResult.success(financeService.queryAccountPersonalPreListCom(reqDTO));
    }
/**
   * D2-新增目标预算设置个性准备(redis)
   */
    @PostMapping("addTargetBudgetSetPersonalPreCom")
    public OkrResult<AddTargetBudgetSetPersonalPreComRespDto> addTargetBudgetSetPersonalPreCom(@RequestBody @Validated AddTargetBudgetSetPersonalPreComReqDto reqDTO){
    return OkrResult.success(financeService.addTargetBudgetSetPersonalPreCom(reqDTO));
    }
/**
   * D2-查询目标预算设置个性准备部分数据列表（入参查redis）
   */
    @PostMapping("queryTargetBudgetSetPersonalPreRefListCom")
    public OkrResult<QueryTargetBudgetSetPersonalPreRefListComRespDto> queryTargetBudgetSetPersonalPreRefListCom(@RequestBody @Validated QueryTargetBudgetSetPersonalPreRefListComReqDto reqDTO){
    return OkrResult.success(financeService.queryTargetBudgetSetPersonalPreRefListCom(reqDTO));
    }
/**
   * D2修改目标预算设置(redis)
   */
    @PostMapping("updateTargetBudgetSetRedisCom")
    public OkrResult<UpdateTargetBudgetSetRedisComRespDto> updateTargetBudgetSetRedisCom(@RequestBody @Validated UpdateTargetBudgetSetRedisComReqDto reqDTO){
    return OkrResult.success(financeService.updateTargetBudgetSetRedisCom(reqDTO));
    }
}
